package com.project2.controller;

import com.project2.bean.ResultVo;
import com.project2.bean.vo.DataInAdminRegionVo;
import com.project2.service.AdminRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangminghui
 * @date 2022/8/12
 */
@RestController
@RequestMapping("admin/region")
public class AdminRegionController {
    @Autowired
    AdminRegionService adminRegionService;

    @RequestMapping("list")
    public ResultVo list() {
        // get没有携带任何参数
        DataInAdminRegionVo data = adminRegionService.queryAllRegionInfo();
        return ResultVo.ok(data);
    }

}
